package com.gaara.test.utils;

import android.graphics.Bitmap;
import android.graphics.Canvas;

public class GraphicsUtils {

	/** 创建位图**/
	public static void rotateBitmap(Canvas canvas,Bitmap bitmap,float angle,int alpha,float scale) {
/*		Matrix matrix = new Matrix();
		matrix.setScale(4, 4);
		Bitmap resizeBmp = Bitmap.createBitmap(bitmap, 0, 0, bitmap.getWidth(), bitmap.getHeight(),matrix, true);

		matrix = new Matrix();
		matrix.setTranslate(resizeBmp.getWidth()/2,resizeBmp.getHeight()/2);
		matrix.preRotate(angle);

		matrix.preTranslate(-resizeBmp.getWidth()/2,-resizeBmp.getHeight()/2);
		matrix.postTranslate((canvas.getWidth()-resizeBmp.getWidth())/2,(canvas.getHeight()-resizeBmp.getHeight())/2);

		Paint vPaint = new Paint();
        vPaint.setStyle( Paint.Style.STROKE );   //绌哄績
        vPaint.setAlpha(alpha);   // Bitmap閫忔槑搴�0 ~ 100)
		canvas.drawBitmap(resizeBmp,matrix,vPaint);*/
		
		Bitmap resizeBmp = Bitmap.createBitmap(bitmap, 0, 0, bitmap.getWidth()/2, bitmap.getHeight()/2);
		canvas.drawBitmap(resizeBmp, 0,0,null);
	}
}
